"""一个可用于表示汽车的类"""
class Car:
    '''一次模拟汽车的简单尝试'''
    def __init__(self,make,model,year):
        self.make               = make
        self.model              = model
        self.year               = year
        self.odometer_reading   = 0
    def get_descriptiove_name(self):
        long_name = f"{self.year} {self.make} {self.model}"
        return long_name.title()

    def read_odometer(self):
        print(f"This car has {self.odometer_reading} miles on it.")

    def update_odometer(self,miles):
        if miles>=self.odometer_reading:
            self.odometer_reading = miles
        else:
            print("You can't roll back an odometer!")

    def incresement_odometer(self,in_miles):
        if in_miles >= self.odometer_reading:
            self.odometer_reading += in_miles
        else:
            print("You can't roll back an odometer!")
